package com.app.stick.monitor.domain.vo;/**
 * @program: app-admin
 * @name BizMonitorCacheVo
 * @description: 监测数据缓存
 */

import com.app.common.utils.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 *@author:
 *@program: app-admin
 *@name BizMonitorCacheVo
 *@description: 监测数据缓存
 */
@Data
@ApiModel(value = "BizMonitorCacheVo" , description = "监测数据缓存" )
public class BizMonitorCacheVo {

    @ApiModelProperty(value = "设备编码")
    private String deviceCode;

    @ApiModelProperty(value = "绑定ID")
    private String pdiId;

    @ApiModelProperty(value = "就诊ID")
    private String visitId;

    @ApiModelProperty(value = "首次收到数据的时间")
    private Date monitorFirstDate;

    @ApiModelProperty(value = "最后一次收到数据的时间")
    private Date monitorEndDate;

    @ApiModelProperty(value = "当前电量")
    private Integer pmiElectricity;

    @ApiModelProperty(value = "当前温度")
    private Double pmiTemperature;

    @ApiModelProperty(value = "间隔时长")
    private Long intervalSeconds;

    public Long getIntervalSeconds() {
        long intervalSeconds = DateUtils.diffDateSeconds(this.monitorFirstDate, this.monitorEndDate);
        return intervalSeconds;
    }
}
